Integrand size = 30, antiderivative size = 57 \[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 C E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+\frac {2 C \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]
-2*C*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x +1/2*c),2^(1/2))/d+2*B*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*Ell ipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+2*C*sin(d*x+c)/d/cos(d*x+c)^(1/2)
Time = 0.27 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.89 \[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \left (-C E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\frac {C \sin (c+d x)}{\sqrt {\cos (c+d x)}}\right )}{d} \]
(2*(-(C*EllipticE[(c + d*x)/2, 2]) + B*EllipticF[(c + d*x)/2, 2] + (C*Sin[ c + d*x])/Sqrt[Cos[c + d*x]]))/d
Time = 0.40 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3042, 4552, 3042, 3227, 3042, 3116, 3042, 3119, 3120}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec (c+d x)^2\right )dx\) |
\(\Big \downarrow \) 4552 |
\(\displaystyle \int \frac {B \cos (c+d x)+C}{\cos ^{\frac {3}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \sin \left (c+d x+\frac {\pi }{2}\right )+C}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle B \int \frac {1}{\sqrt {\cos (c+d x)}}dx+C \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+C \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3116 |
\(\displaystyle B \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+C \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\int \sqrt {\cos (c+d x)}dx\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+C \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx\right )\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle B \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+C \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {2 B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+C \left (\frac {2 \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )\) |
(2*B*EllipticF[(c + d*x)/2, 2])/d + C*((-2*EllipticE[(c + d*x)/2, 2])/d + (2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]]))
3.12.77.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1))), x] + Simp[(n + 2)/(b^2*(n + 1)) I nt[(b*Sin[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && IntegerQ[2*n]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(m_)*((A_.) + (B_.)*sec[(e_.) + (f_.)*( x_)] + (C_.)*sec[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[b^2 Int[(b*Cos [e + f*x])^(m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; FreeQ [{b, e, f, A, B, C, m}, x] && !IntegerQ[m]
Time = 0.89 (sec) , antiderivative size = 148, normalized size of antiderivative = 2.60
method | result | size |
default | \(-\frac {2 \left (B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-2 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(148\) |
-2*(B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Ellipt icF(cos(1/2*d*x+1/2*c),2^(1/2))-2*C*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^ 2+C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Elliptic E(cos(1/2*d*x+1/2*c),2^(1/2)))/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2- 1)^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.74 \[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {-i \, \sqrt {2} B \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} B \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - i \, \sqrt {2} C \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + i \, \sqrt {2} C \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, C \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \]
(-I*sqrt(2)*B*cos(d*x + c)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin (d*x + c)) + I*sqrt(2)*B*cos(d*x + c)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - I*sqrt(2)*C*cos(d*x + c)*weierstrassZeta(-4, 0, we ierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + I*sqrt(2)*C*cos (d*x + c)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) + 2*C*sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c))
\[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (B + C \sec {\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}} \sec {\left (c + d x \right )}\, dx \]
\[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \]
\[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \,d x } \]
Time = 18.52 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.05 \[ \int \sqrt {\cos (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,B\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]